<?php


namespace app\traits;


trait Singleton
{
    private static  $instance;

    /**
     * @param mixed ...$arg
     * @return static
     */
    public static function getInstance(...$arg)
    {
        if (static::$instance === null) {
            static::$instance = new self(...$arg);
        }
        return static::$instance;
    }
}